<template>
    <div>
        <el-upload class="upload-demo" style="float:right;margin-right: 15px" :action="uploadApi"
                    :show-file-list="false" multiple :limit="3" :file-list="fileList" :on-success="uploadSuccess">
                    <el-button size="small" type="primary">批量录入</el-button>
                </el-upload>
        <span><b>投资案例</b></span>
        <InvestmentCases ref="investmentCases"/>
        <span><b>历史投资案例</b></span>
        <InvestmentCasesHistory ref="investmentCasesHistory"/>
    </div>
</template>
<script>
import InvestmentCases from './InvestmentCases.vue';
import InvestmentCasesHistory from './InvestmentCasesHistory.vue';
export default {
    name: '',
    components: {
        InvestmentCases,
        InvestmentCasesHistory
    },
    mixins: [],
    props: {

    },
    data() {
        return {
            uploadApi: process.env.BASE_API + '/fund/import/investments',
            fileList: []
        }
    },
    computed: {

    },
    watch: {

    },
    mounted() {
        

    },
    methods: {
        uploadSuccess() {
            this.$message.success('导入成功')
            this.$refs.investmentCases.getList();
            this.$refs.investmentCasesHistory.getList();
        }
    }
};
</script>
<style lang='' scoped>
</style>